package observerpattern.example1;

import java.util.Observable;

/**
 * 具体目标实现类 微信公众号
 *
 * @author hongchen
 *         Created 2017-03-05-12:44
 */
public class ConcreteGongzonghaoSubject extends Observable {
    private String contend;


    public String getContend() {
        return contend;
    }

    public void setContend(String contend) {
        this.contend = contend;
        //利用java自带观察者包必须先调用该方法
        this.setChanged();
        //推模型
        this.notifyObservers(contend);
        //拉模型
        this.notifyObservers();
    }
}
